package com.jsoft.entity.wang;

import com.alibaba.fastjson.annotation.JSONField;

import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Objects;

/**
 * @author MG
 * @email 593020160@qq.com
 * @date 2023/2/22
 */
public class Transfer implements Serializable {


    private static final long serialVersionUID = -6713159810825782001L;

    private Integer id;
    private String no;
    private Integer transferEnterpriseId;
    private Integer receiveEnterpriseId;
    private String receiveEnterpriseName;
    private String openEnterpriseName;

    private Integer openEnterpriseId;
    private Double amount;
    private Integer institutyId;
    private String institutyName;

    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date openTime;

    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date transferTime;

    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date expiryTime;
    private String uplinkAddress;
    private String status;
    private String progressStatus;
    private Integer voucherId;
    private String paymentInterestType;
    private String remark;
    private Double amount1;
    private Double amount2;

    public Transfer() {
    }

    public Transfer(String no, Integer receiveEnterpriseId, Integer openEnterpriseId, Date openTime, String status, Double amount1, Double amount2) {
        this.no = no;
        this.receiveEnterpriseId = receiveEnterpriseId;
        this.openEnterpriseId = openEnterpriseId;
        this.openTime = openTime;
        this.status = status;
        this.amount1 = amount1;
        this.amount2 = amount2;
    }

    public Transfer(String no, Integer receiveEnterpriseId, Integer openEnterpriseId, Double amount, Date openTime, String status) {
        this.no = no;
        this.receiveEnterpriseId = receiveEnterpriseId;
        this.openEnterpriseId = openEnterpriseId;
        this.amount = amount;
        this.openTime = openTime;
        this.status = status;
    }

    public String getInstitutyName() {
        return institutyName;
    }

    public void setInstitutyName(String institutyName) {
        this.institutyName = institutyName;
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public String getReceiveEnterpriseName() {
        return receiveEnterpriseName;
    }

    public void setReceiveEnterpriseName(String receiveEnterpriseName) {
        this.receiveEnterpriseName = receiveEnterpriseName;
    }

    public String getOpenEnterpriseName() {
        return openEnterpriseName;
    }

    public void setOpenEnterpriseName(String openEnterpriseName) {
        this.openEnterpriseName = openEnterpriseName;
    }


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getNo() {
        return no;
    }

    public void setNo(String no) {
        this.no = no;
    }

    public Integer getTransferEnterpriseId() {
        return transferEnterpriseId;
    }

    public void setTransferEnterpriseId(Integer transferEnterpriseId) {
        this.transferEnterpriseId = transferEnterpriseId;
    }

    public Integer getReceiveEnterpriseId() {
        return receiveEnterpriseId;
    }

    public void setReceiveEnterpriseId(Integer receiveEnterpriseId) {
        this.receiveEnterpriseId = receiveEnterpriseId;
    }

    public Integer getOpenEnterpriseId() {
        return openEnterpriseId;
    }

    public void setOpenEnterpriseId(Integer openEnterpriseId) {
        this.openEnterpriseId = openEnterpriseId;
    }

    public Integer getInstitutyId() {
        return institutyId;
    }

    public void setInstitutyId(Integer institutyId) {
        this.institutyId = institutyId;
    }

    public Date getOpenTime() {
        return this.openTime;
    }

    public void setOpenTime(Date openTime) {
        this.openTime = openTime;
    }

    public Date getTransferTime() {
        return transferTime;
    }

    public void setTransferTime(Date transferTime) {
        this.transferTime = transferTime;
    }

    public Date getExpiryTime() {
        return expiryTime;
    }

    public void setExpiryTime(Date expiryTime) {
        this.expiryTime = expiryTime;
    }

    public String getUplinkAddress() {
        return uplinkAddress;
    }

    public void setUplinkAddress(String uplinkAddress) {
        this.uplinkAddress = uplinkAddress;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
//        if (Objects.equals(status, "A")) {
//            this.status = "成功";
//        }
//        if (Objects.equals(status, "B")) {
//            this.status = "转让中";
//        }
//        if (Objects.equals(status, "c")) {
//            this.status = "失败";
//        }
        this.status=status;
    }

    public String getProgressStatus() {
        return progressStatus;
    }
    public void setProgressStatus(String progressStatus) {
//        if (Objects.equals(progressStatus, "A")) {
//            this.progressStatus = "成功";
//        }if(Objects.equals(progressStatus, "B")){
//        this.progressStatus ="转让中";
//        }if(Objects.equals(progressStatus, "C")){
            this.progressStatus = progressStatus;
//        }


    }

    public Integer getVoucherId() {
        return voucherId;
    }

    public void setVoucherId(Integer voucherId) {
        this.voucherId = voucherId;
    }

    public String getPaymentInterestType() {
        return paymentInterestType;
    }

    public void setPaymentInterestType(String paymentInterestType) {
        this.paymentInterestType = paymentInterestType;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Double getAmount() {
        return amount;
    }

    public void setAmount(Double amount) {
        this.amount = amount;
    }

    public Double getAmount1() {
        return amount1;
    }

    public void setAmount1(Double amount1) {
        this.amount1 = amount1;
    }

    public Double getAmount2() {
        return amount2;
    }

    public void setAmount2(Double amount2) {
        this.amount2 = amount2;
    }

    @Override
    public String toString() {
        return "Transfer{" +
                "id=" + id +
                ", no='" + no + '\'' +
                ", transferEnterpriseId=" + transferEnterpriseId +
                ", receiveEnterpriseId=" + receiveEnterpriseId +
                ", openEnterpriseId=" + openEnterpriseId +
                ", amount=" + amount +
                ", institutyId=" + institutyId +
                ", openTime=" + openTime +
                ", transferTime=" + transferTime +
                ", expiryTime=" + expiryTime +
                ", uplinkAddress='" + uplinkAddress + '\'' +
                ", status='" + status + '\'' +
                ", progressStatus='" + progressStatus + '\'' +
                ", voucherId=" + voucherId +
                ", paymentInterestType='" + paymentInterestType + '\'' +
                ", remark='" + remark + '\'' +
                ", amount1=" + amount1 +
                ", amount2=" + amount2 +
                '}';
    }
}
